package edu.csl.study.shardingsphere.hint;

import org.apache.shardingsphere.api.hint.HintManager;

public class HintManagerHelper {

	static void initializeHintManagerForShardingDatabasesAndTables(final HintManager hintManager) {
		//设置分库的值
		hintManager.addDatabaseShardingValue("health_record", 5L);
		//设置分表的值
		hintManager.addTableShardingValue("health_record", 1L);
	}

	static void initializeHintManagerForShardingDatabases(final HintManager hintManager) {
		//设置数据源分片值
		hintManager.setDatabaseShardingValue(1L);
	}
    // 强制走主库
	static void initializeHintManagerForMaster(final HintManager hintManager) {
		hintManager.setMasterRouteOnly();
	}
}
